<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>系统登录</title>
<link href="${ctx}/static/bjui/themes/css/bootstrap.min.css"
	rel="stylesheet">
<style type="text/css">
* {
	font-family: "Verdana", "Tahoma", "Lucida Grande", "Microsoft YaHei",
		"Hiragino Sans GB", sans-serif;
}

body {
	background: url(${ctx}/static/bjui/images/loginbg_01.jpg) no-repeat
		center center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}
.login_box #validateCode{
     width:239px;
}
.login_box
a:link {
	color: #285e8e;
}

.main_box {
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: -260px;
	margin-left: -300px;
	padding: 30px;
	width: 600px;
	height: 460px;
	background: #FAFAFA;
	background: rgba(255, 255, 255, 0.5);
	border: 1px #DDD solid;
	border-radius: 5px;
	-webkit-box-shadow: 1px 5px 8px #888888;
	-moz-box-shadow: 1px 5px 8px #888888;
	box-shadow: 1px 5px 8px #888888;
}

.main_box .setting {
	position: absolute;
	top: 5px;
	right: 10px;
	width: 10px;
	height: 10px;
}

.main_box .setting a {
	color: #FF6600;
}

.main_box .setting a:hover {
	color: #555;
}

.login_logo {
	margin-bottom: 20px;
	height: 45px;
	text-align: center;
	font-size:30px;
}

.login_msg {
	text-align: center;
	font-size: 16px;
}

.login_form {
	padding-top: 20px;
	font-size: 16px;
}

.login_box .form-control {
	display: inline-block;
	*display: inline;
	zoom: 1;
	width: auto;
	font-size: 18px;
}

.login_box .form-control.x319 {
	width: 319px;
}

.login_box .form-control.x164 {
	width: 164px;
}

.login_box .form-group {
	margin-bottom: 20px;
}

.login_box .form-group label.t {
	width: 120px;
	text-align: right;
	cursor: pointer;
}

.login_box .form-group.space {
	padding-top: 15px;
	border-top: 1px #FFF dotted;
}

.login_box .form-group img {
	margin-top: 1px;
	height: 32px;
	vertical-align: top;
}

.login_box .m {
	cursor: pointer;
}

.bottom {
	text-align: center;
	font-size: 12px;
}
input.error{
   position:static;
}
.form-group{
 position:relative;
}
.error{
	color:red;
	position:absolute;
	right:100px;
	top:5px;
	font-size:14px;
}
#codediv .error{
   right:180px;
}

</style>
<script src="${ctx}/static/bjui/js/jquery-1.11.3.min.js"></script>
<script src="${ctx}/static/js/jquery.validate.min.js"></script>
<script type="text/javascript">
$(function() {
	$().ready(function() {
    choose_bg();
    $("#login_form").validate({
    rules: {
	      firstname: "required",
	      lastname: "required",
	      j_account: {
	        required: true,
	        rangelength:[5,16]
	      },
	      j_password: {
	        required: true,
	        rangelength:[5,16]
	      },
	      validateCode:{
	    	  required: true
	    	  
	      }
     
    },
    messages: {
      firstname: "请输入您的名字",
      lastname: "请输入验证码",
      j_account: {
        required: "不能为空",
        rangelength: "长度5-16位"
      },
      j_password: {
        required: "不能为空",
        rangelength: "长度5-16位"
      },
      validateCode: {
          required: "不能为空"
        }
    }
   });
});
	$("#J_account").focus();
	
}); 
function genTimestamp(){
	var time = new Date();
	return time.getTime();
}
function changeCode(){
	//$("#captcha_img").attr("src", "/captcha.jpeg?t="+genTimestamp());
}
function choose_bg() {
	var bg = Math.floor(Math.random() * 9 + 1);
	$('body').css('background-image', 'url(${ctx}/static/bjui/images/loginbg_0'+ bg +'.jpg)');
}
</script>
</head>
<body>
	<!--[if lte IE 7]>
<style type="text/css">
#errorie {position: fixed; top: 0; z-index: 100000; height: 30px; background: #FCF8E3;}
#errorie div {width: 900px; margin: 0 auto; line-height: 30px; color: orange; font-size: 14px; text-align: center;}
#errorie div a {color: #459f79;font-size: 14px;}
#errorie div a:hover {text-decoration: underline;}
</style>
<div id="errorie"><div>您还在使用老掉牙的IE，请升级您的浏览器到 IE8以上版本 <a target="_blank" href="http://windows.microsoft.com/zh-cn/internet-explorer/ie-8-worldwide-languages">点击升级</a>&nbsp;&nbsp;强烈建议您更改换浏览器：<a href="http://down.tech.sina.com.cn/content/40975.html" target="_blank">谷歌 Chrome</a></div></div>
<![endif]-->
	<div class="main_box">
		<div class="setting">
			<a href="javascript:;" onclick="choose_bg();" title="更换背景"><span
				class="glyphicon glyphicon-th-large"></span></a>
		</div>
		<div class="login_box">
			<div class="login_logo">后台管理系统</div>

			<div class="login_msg">
				<font color="red">${message!}</font>
			</div>

			<div class="login_form">
				<form method="post" id="login_form" action="${ctx}/login">
					<div class="form-group">
						<label for="j_account" class="t" value="admin">用户名：</label> <input
							id="j_account" name="j_account" type="text"
							class="form-control x319 in" autocomplete="off">
					</div>
					<div class="form-group">
						<label for="j_password" class="t" value="123456">密 码：</label> <input
							id="j_password" name="j_password" type="password"
							class="form-control x319 in">
					</div>
					<div class="form-group" id="codediv">
						<label for="validateCode" class="t">验证码：</label> <input
							id="validateCode" name="validateCode" type="text"
							class="form-control in"><img id="validatecode_img"
							src="${ctx}/validateCode" style="cursor: pointer" alt="验证码"
							title="点击更换" width="80" height="20" align='absMiddle'
							onclick="this.src='${ctx}/validateCode?random=' + Math.random();" />
					</div>
					<!-- <div class="form-group" style="display: none">
						<label class="t"></label> <label for="rememberMe" class="m"><input
							name="rememberMe" type="checkbox">&nbsp;记住登陆账号!</label>
					</div> -->
					<div class="form-group space">
						<label class="t"></label> <input type="submit" id="login_ok"
							value="&nbsp;登&nbsp;录&nbsp;" class="btn btn-primary btn-lg">&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="reset" value="&nbsp;重&nbsp;置&nbsp;"
							class="btn btn-default btn-lg">
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>